package com.dlc.shop.bean.enums;

/**
 * @author chendt
 * @date 2021/5/13 16:52
 */
public enum ShopWithdrawCashStatus {
    /**
     * 审核中
     */
    WAITAUDIT(0, "审核中"),
    /**
     * 审核成功
     */
    SUCCESSAUDIT(1, "审核成功"),

    /**
     * 审核失败
     */
    FAILAUDIT(-1, "审核失败");

    private final Integer num;

    private final String text;

    public Integer value() {
        return num;
    }

    public String text() {
        return text;
    }

    ShopWithdrawCashStatus(Integer num, String text) {
        this.num = num;
        this.text = text;
    }

    public static ShopWithdrawCashStatus instance(Integer value) {
        ShopWithdrawCashStatus[] enums = values();
        for (ShopWithdrawCashStatus statusEnum : enums) {
            if (statusEnum.value().equals(value)) {
                return statusEnum;
            }
        }
        return null;
    }
}
